<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GPIO abstraction</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__nrf__gpio.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">GPIO abstraction</div>  </div>
<div class="ingroups"><a class="el" href="group__nrfdrivers.html">nRF Drivers</a></div></div>
<div class="contents">

<p>GPIO pin abstraction and port abstraction for reading and writing byte-wise to GPIO ports.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga494d7ac30db1cbb6366e0b9ebd5b49b4">nrf_gpio_port_dir_t</a> { <a class="el" href="group__nrf__gpio.html#gga494d7ac30db1cbb6366e0b9ebd5b49b4a90b7ce7a76775cb7534487635755be3f">NRF_GPIO_PORT_DIR_OUTPUT</a>, 
<a class="el" href="group__nrf__gpio.html#gga494d7ac30db1cbb6366e0b9ebd5b49b4a6ec5811669635e30b9dc014e1f494936">NRF_GPIO_PORT_DIR_INPUT</a>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumerator used for setting the direction of a GPIO port.  <a href="group__nrf__gpio.html#ga494d7ac30db1cbb6366e0b9ebd5b49b4">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga4089fa9e3311c34d254d4d00029911bc">nrf_gpio_pin_dir_t</a> { <a class="el" href="group__nrf__gpio.html#gga4089fa9e3311c34d254d4d00029911bcadcb15e081def4002ed564fd8abbaa29d">NRF_GPIO_PIN_DIR_INPUT</a>, 
<a class="el" href="group__nrf__gpio.html#gga4089fa9e3311c34d254d4d00029911bca51b31d6f52c664433688ecc535e49f54">NRF_GPIO_PIN_DIR_OUTPUT</a>
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a> { <a class="el" href="group__nrf__gpio.html#ggaa1a5c145e334817f2d960317d64fcb3dada4c86d9760e81857ec0482c1cc78190">NRF_GPIO_PORT_SELECT_PORT0</a> =  0, 
<a class="el" href="group__nrf__gpio.html#ggaa1a5c145e334817f2d960317d64fcb3da9209d7820d65eb58c7804e676581bf40">NRF_GPIO_PORT_SELECT_PORT1</a>, 
<a class="el" href="group__nrf__gpio.html#ggaa1a5c145e334817f2d960317d64fcb3daf83f3be082e45a73102618f149448fc8">NRF_GPIO_PORT_SELECT_PORT2</a>, 
<a class="el" href="group__nrf__gpio.html#ggaa1a5c145e334817f2d960317d64fcb3da9075a015252fd02d27ba7ca897aa564d">NRF_GPIO_PORT_SELECT_PORT3</a>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumerator used for selecting between port 0 - 3.  <a href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">nrf_gpio_pin_pull_t</a> { <a class="el" href="group__nrf__gpio.html#gga07e0c8c0b30499cf0a7b79dbe62d3fcca13ffcb94eb78be866c66b5f5b516af65">NRF_GPIO_PIN_NOPULL</a> =  GPIO_PIN_CNF_PULL_Disabled, 
<a class="el" href="group__nrf__gpio.html#gga07e0c8c0b30499cf0a7b79dbe62d3fcca314d4b349d7e59ea3373a1ced4f32e4d">NRF_GPIO_PIN_PULLDOWN</a> =  GPIO_PIN_CNF_PULL_Pulldown, 
<a class="el" href="group__nrf__gpio.html#gga07e0c8c0b30499cf0a7b79dbe62d3fccad60f768c699495d9976a45fa7a9f51c6">NRF_GPIO_PIN_PULLUP</a> =  GPIO_PIN_CNF_PULL_Pullup
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumerator used for selecting the pin to be pulled down or up at the time of pin configuration.  <a href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga08c820bf0360c7406b64ddaf3bfc7222">nrf_gpio_range_cfg_output</a> (uint32_t pin_range_start, uint32_t pin_range_end)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure GPIO pin range as outputs with normal drive strength. This function can be used to configure pin range as simple output with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases).  <a href="#ga08c820bf0360c7406b64ddaf3bfc7222"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga6d5c4a1b82ed45f7972aea6572e085f5">nrf_gpio_range_cfg_input</a> (uint32_t pin_range_start, uint32_t pin_range_end, <a class="el" href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">nrf_gpio_pin_pull_t</a> pull_config)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure GPIO pin range as inputs with given initial value set, hiding inner details. This function can be used to configure pin range as simple input.  <a href="#ga6d5c4a1b82ed45f7972aea6572e085f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga0271806dc37bffea02d199474d526a35">nrf_gpio_cfg_output</a> (uint32_t pin_number)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure given GPIO pin number as output with given initial value set, hiding inner details. This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases).  <a href="#ga0271806dc37bffea02d199474d526a35"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga4e63d442ebd572126be3e030b3df4dc6">nrf_gpio_cfg_input</a> (uint32_t pin_number, <a class="el" href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">nrf_gpio_pin_pull_t</a> pull_config)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure given GPIO pin number as input with given initial value set, hiding inner details. This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases).  <a href="#ga4e63d442ebd572126be3e030b3df4dc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gaaa7d06cd383f816f71e277b97ca5f3d9">nrf_gpio_pin_dir_set</a> (uint32_t pin_number, <a class="el" href="group__nrf__gpio.html#ga4089fa9e3311c34d254d4d00029911bc">nrf_gpio_pin_dir_t</a> direction)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the direction for a GPIO pin.  <a href="#gaaa7d06cd383f816f71e277b97ca5f3d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gacaf7e8e242a47f7b635bbeca5c5934a3">nrf_gpio_pin_set</a> (uint32_t pin_number)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set GPIO pin.  <a href="#gacaf7e8e242a47f7b635bbeca5c5934a3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gaf3de3729249d55592c86ecfa97fb9347">nrf_gpio_pin_clear</a> (uint32_t pin_number)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear GPIO pin.  <a href="#gaf3de3729249d55592c86ecfa97fb9347"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga5c8310a3b7a81cc4a267844c81769a40">nrf_gpio_pin_toggle</a> (uint32_t pin_number)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Toggle GPIO pin.  <a href="#ga5c8310a3b7a81cc4a267844c81769a40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga7fefa8a71e25eeb57b5b4230b0dd0484">nrf_gpio_pin_write</a> (uint32_t pin_number, uint32_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write value to GPIO pin.  <a href="#ga7fefa8a71e25eeb57b5b4230b0dd0484"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga0983906029818d8aa199b71b578d1c12">nrf_gpio_pin_read</a> (uint32_t pin_number)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the input level of a GPIO pin.  <a href="#ga0983906029818d8aa199b71b578d1c12"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gacf721556f8a9d59b8542347c1a398bf6">nrf_gpio_word_byte_write</a> (volatile uint32_t *word_address, uint8_t byte_no, uint8_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic function for writing a single byte of a 32 bit word at a given address.  <a href="#gacf721556f8a9d59b8542347c1a398bf6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga2a875912b5b23a75207cc3e5a61eaf0f">nrf_gpio_word_byte_read</a> (const volatile uint32_t *word_address, uint8_t byte_no)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic function for reading a single byte of a 32 bit word at a given address.  <a href="#ga2a875912b5b23a75207cc3e5a61eaf0f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gaaa72c88a2a29927a1eeff691d6a21afc">nrf_gpio_port_dir_set</a> (<a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a> port, <a class="el" href="group__nrf__gpio.html#ga494d7ac30db1cbb6366e0b9ebd5b49b4">nrf_gpio_port_dir_t</a> dir)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the direction of a port.  <a href="#gaaa72c88a2a29927a1eeff691d6a21afc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga40bee84dc81b9f8981eb2647dac9d267">nrf_gpio_port_read</a> (<a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a> port)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read GPIO port.  <a href="#ga40bee84dc81b9f8981eb2647dac9d267"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#gac1d4940bc5ad4aad4f6363c7021b08ae">nrf_gpio_port_write</a> (<a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a> port, uint8_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write GPIO port.  <a href="#gac1d4940bc5ad4aad4f6363c7021b08ae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga16a605149e0f0fd93fdb49b2dcaffc43">nrf_gpio_port_set</a> (<a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a> port, uint8_t set_mask)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set individual pins on GPIO port.  <a href="#ga16a605149e0f0fd93fdb49b2dcaffc43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__gpio.html#ga6752ee7db03061e5a3253891651c7c5e">nrf_gpio_port_clear</a> (<a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a> port, uint8_t clr_mask)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear individual pins on GPIO port.  <a href="#ga6752ee7db03061e5a3253891651c7c5e"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>GPIO pin abstraction and port abstraction for reading and writing byte-wise to GPIO ports. </p>
<p>Here, the GPIO ports are defined as follows:</p>
<ul>
<li>Port 0 -&gt; pin 0-7</li>
<li>Port 1 -&gt; pin 8-15</li>
<li>Port 2 -&gt; pin 16-23</li>
<li>Port 3 -&gt; pin 24-31 </li>
</ul>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga494d7ac30db1cbb6366e0b9ebd5b49b4"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_dir_t" ref="ga494d7ac30db1cbb6366e0b9ebd5b49b4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__nrf__gpio.html#ga494d7ac30db1cbb6366e0b9ebd5b49b4">nrf_gpio_port_dir_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enumerator used for setting the direction of a GPIO port. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga494d7ac30db1cbb6366e0b9ebd5b49b4a90b7ce7a76775cb7534487635755be3f"></a><!-- doxytag: member="NRF_GPIO_PORT_DIR_OUTPUT" ref="gga494d7ac30db1cbb6366e0b9ebd5b49b4a90b7ce7a76775cb7534487635755be3f" args="" -->NRF_GPIO_PORT_DIR_OUTPUT</em>&nbsp;</td><td>
<p>Output. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga494d7ac30db1cbb6366e0b9ebd5b49b4a6ec5811669635e30b9dc014e1f494936"></a><!-- doxytag: member="NRF_GPIO_PORT_DIR_INPUT" ref="gga494d7ac30db1cbb6366e0b9ebd5b49b4a6ec5811669635e30b9dc014e1f494936" args="" -->NRF_GPIO_PORT_DIR_INPUT</em>&nbsp;</td><td>
<p>Input. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00024">24</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga4089fa9e3311c34d254d4d00029911bc"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_dir_t" ref="ga4089fa9e3311c34d254d4d00029911bc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__nrf__gpio.html#ga4089fa9e3311c34d254d4d00029911bc">nrf_gpio_pin_dir_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pin direction definitions. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga4089fa9e3311c34d254d4d00029911bcadcb15e081def4002ed564fd8abbaa29d"></a><!-- doxytag: member="NRF_GPIO_PIN_DIR_INPUT" ref="gga4089fa9e3311c34d254d4d00029911bcadcb15e081def4002ed564fd8abbaa29d" args="" -->NRF_GPIO_PIN_DIR_INPUT</em>&nbsp;</td><td>
<p>Input. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga4089fa9e3311c34d254d4d00029911bca51b31d6f52c664433688ecc535e49f54"></a><!-- doxytag: member="NRF_GPIO_PIN_DIR_OUTPUT" ref="gga4089fa9e3311c34d254d4d00029911bca51b31d6f52c664433688ecc535e49f54" args="" -->NRF_GPIO_PIN_DIR_OUTPUT</em>&nbsp;</td><td>
<p>Output. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00034">34</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaa1a5c145e334817f2d960317d64fcb3d"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_select_t" ref="gaa1a5c145e334817f2d960317d64fcb3d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enumerator used for selecting between port 0 - 3. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaa1a5c145e334817f2d960317d64fcb3dada4c86d9760e81857ec0482c1cc78190"></a><!-- doxytag: member="NRF_GPIO_PORT_SELECT_PORT0" ref="ggaa1a5c145e334817f2d960317d64fcb3dada4c86d9760e81857ec0482c1cc78190" args="" -->NRF_GPIO_PORT_SELECT_PORT0</em>&nbsp;</td><td>
<p>Port 0 (GPIO pin 0-7) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa1a5c145e334817f2d960317d64fcb3da9209d7820d65eb58c7804e676581bf40"></a><!-- doxytag: member="NRF_GPIO_PORT_SELECT_PORT1" ref="ggaa1a5c145e334817f2d960317d64fcb3da9209d7820d65eb58c7804e676581bf40" args="" -->NRF_GPIO_PORT_SELECT_PORT1</em>&nbsp;</td><td>
<p>Port 1 (GPIO pin 8-15) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa1a5c145e334817f2d960317d64fcb3daf83f3be082e45a73102618f149448fc8"></a><!-- doxytag: member="NRF_GPIO_PORT_SELECT_PORT2" ref="ggaa1a5c145e334817f2d960317d64fcb3daf83f3be082e45a73102618f149448fc8" args="" -->NRF_GPIO_PORT_SELECT_PORT2</em>&nbsp;</td><td>
<p>Port 2 (GPIO pin 16-23) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa1a5c145e334817f2d960317d64fcb3da9075a015252fd02d27ba7ca897aa564d"></a><!-- doxytag: member="NRF_GPIO_PORT_SELECT_PORT3" ref="ggaa1a5c145e334817f2d960317d64fcb3da9075a015252fd02d27ba7ca897aa564d" args="" -->NRF_GPIO_PORT_SELECT_PORT3</em>&nbsp;</td><td>
<p>Port 3 (GPIO pin 24-31) </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00044">44</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga07e0c8c0b30499cf0a7b79dbe62d3fcc"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_pull_t" ref="ga07e0c8c0b30499cf0a7b79dbe62d3fcc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">nrf_gpio_pin_pull_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enumerator used for selecting the pin to be pulled down or up at the time of pin configuration. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga07e0c8c0b30499cf0a7b79dbe62d3fcca13ffcb94eb78be866c66b5f5b516af65"></a><!-- doxytag: member="NRF_GPIO_PIN_NOPULL" ref="gga07e0c8c0b30499cf0a7b79dbe62d3fcca13ffcb94eb78be866c66b5f5b516af65" args="" -->NRF_GPIO_PIN_NOPULL</em>&nbsp;</td><td>
<p>Pin pullup resistor disabled. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga07e0c8c0b30499cf0a7b79dbe62d3fcca314d4b349d7e59ea3373a1ced4f32e4d"></a><!-- doxytag: member="NRF_GPIO_PIN_PULLDOWN" ref="gga07e0c8c0b30499cf0a7b79dbe62d3fcca314d4b349d7e59ea3373a1ced4f32e4d" args="" -->NRF_GPIO_PIN_PULLDOWN</em>&nbsp;</td><td>
<p>Pin pulldown resistor enabled. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga07e0c8c0b30499cf0a7b79dbe62d3fccad60f768c699495d9976a45fa7a9f51c6"></a><!-- doxytag: member="NRF_GPIO_PIN_PULLUP" ref="gga07e0c8c0b30499cf0a7b79dbe62d3fccad60f768c699495d9976a45fa7a9f51c6" args="" -->NRF_GPIO_PIN_PULLUP</em>&nbsp;</td><td>
<p>Pin pullup resistor enabled. </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00056">56</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga08c820bf0360c7406b64ddaf3bfc7222"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_range_cfg_output" ref="ga08c820bf0360c7406b64ddaf3bfc7222" args="(uint32_t pin_range_start, uint32_t pin_range_end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_range_cfg_output </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_range_start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_range_end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure GPIO pin range as outputs with normal drive strength. This function can be used to configure pin range as simple output with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_range_start</td><td>specifies the start number (inclusive) in the range of pin numbers to be configured (allowed values 0-30)</td></tr>
    <tr><td class="paramname">pin_range_end</td><td>specifies the end number (inclusive) in the range of pin numbers to be configured (allowed values 0-30)</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>For configuring only one pin as output use <a class="el" href="group__nrf__gpio.html#ga0271806dc37bffea02d199474d526a35">nrf_gpio_cfg_output</a> Sense capability on the pin is disabled, and input is disconnected from the buffer as the pins are configured as output. </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00074">74</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga6d5c4a1b82ed45f7972aea6572e085f5"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_range_cfg_input" ref="ga6d5c4a1b82ed45f7972aea6572e085f5" args="(uint32_t pin_range_start, uint32_t pin_range_end, nrf_gpio_pin_pull_t pull_config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_range_cfg_input </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_range_start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_range_end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">nrf_gpio_pin_pull_t</a>&#160;</td>
          <td class="paramname"><em>pull_config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure GPIO pin range as inputs with given initial value set, hiding inner details. This function can be used to configure pin range as simple input. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_range_start</td><td>specifies the start number (inclusive) in the range of pin numbers to be configured (allowed values 0-30)</td></tr>
    <tr><td class="paramname">pin_range_end</td><td>specifies the end number (inclusive) in the range of pin numbers to be configured (allowed values 0-30)</td></tr>
    <tr><td class="paramname">pull_config</td><td>State of the pin range pull resistor (no pull, pulled down or pulled high)</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>For configuring only one pin as input use <a class="el" href="group__nrf__gpio.html#ga4e63d442ebd572126be3e030b3df4dc6">nrf_gpio_cfg_input</a> Sense capability on the pin is disabled, and input is connected to buffer so that the GPIO-&gt;IN register is readable </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00100">100</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga0271806dc37bffea02d199474d526a35"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_cfg_output" ref="ga0271806dc37bffea02d199474d526a35" args="(uint32_t pin_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_cfg_output </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure given GPIO pin number as output with given initial value set, hiding inner details. This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number of gpio pin numbers to be configured (allowed values 0-30)</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Sense capability on the pin is disabled, and input is disconnected from the buffer as the pins are configured as output. </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00121">121</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga4e63d442ebd572126be3e030b3df4dc6"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_cfg_input" ref="ga4e63d442ebd572126be3e030b3df4dc6" args="(uint32_t pin_number, nrf_gpio_pin_pull_t pull_config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_cfg_input </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#ga07e0c8c0b30499cf0a7b79dbe62d3fcc">nrf_gpio_pin_pull_t</a>&#160;</td>
          <td class="paramname"><em>pull_config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure given GPIO pin number as input with given initial value set, hiding inner details. This function can be used to configure pin range as simple input with gate driving GPIO_PIN_CNF_DRIVE_S0S1 (normal cases). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number of gpio pin numbers to be configured (allowed values 0-30)</td></tr>
    <tr><td class="paramname">pull_config</td><td>State of the pin range pull resistor (no pull, pulled down or pulled high)</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>Sense capability on the pin is disabled, and input is connected to buffer so that the GPIO-&gt;IN register is readable </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00141">141</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaaa7d06cd383f816f71e277b97ca5f3d9"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_dir_set" ref="gaaa7d06cd383f816f71e277b97ca5f3d9" args="(uint32_t pin_number, nrf_gpio_pin_dir_t direction)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_pin_dir_set </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#ga4089fa9e3311c34d254d4d00029911bc">nrf_gpio_pin_dir_t</a>&#160;</td>
          <td class="paramname"><em>direction</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the direction for a GPIO pin. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number [0:31] for which to set the direction.</td></tr>
    <tr><td class="paramname">direction</td><td>specifies the direction </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00159">159</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gacaf7e8e242a47f7b635bbeca5c5934a3"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_set" ref="gacaf7e8e242a47f7b635bbeca5c5934a3" args="(uint32_t pin_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_pin_set </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set GPIO pin. </p>
<p>Note that the pin must be configured as an output for this function to have any effect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number [0:31] to set. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00185">185</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf3de3729249d55592c86ecfa97fb9347"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_clear" ref="gaf3de3729249d55592c86ecfa97fb9347" args="(uint32_t pin_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_pin_clear </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clear GPIO pin. </p>
<p>Note that the pin must be configured as an output for this function to have any effect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number [0:31] to clear. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00199">199</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga5c8310a3b7a81cc4a267844c81769a40"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_toggle" ref="ga5c8310a3b7a81cc4a267844c81769a40" args="(uint32_t pin_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_pin_toggle </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Toggle GPIO pin. </p>
<p>Note that the pin must be configured as an output for this function to have any effect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number [0:31] to toggle. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00213">213</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga7fefa8a71e25eeb57b5b4230b0dd0484"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_write" ref="ga7fefa8a71e25eeb57b5b4230b0dd0484" args="(uint32_t pin_number, uint32_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_pin_write </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write value to GPIO pin. </p>
<p>Note that the pin must be configured as an output for this function to have any effect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number [0:31] to write.</td></tr>
    <tr><td class="paramname">value</td><td>specifies the value to be written to the pin. <ul>
<li>0 clears the pin </li>
<li>&gt;=1 sets the pin. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00231">231</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga0983906029818d8aa199b71b578d1c12"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_pin_read" ref="ga0983906029818d8aa199b71b578d1c12" args="(uint32_t pin_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE uint32_t nrf_gpio_pin_read </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read the input level of a GPIO pin. </p>
<p>Note that the pin must have input connected for the value returned from this function to be valid.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pin_number</td><td>specifies the pin number [0:31] to read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>if the pin input level is low. </td></tr>
    <tr><td class="paramname">1</td><td>if the pin input level is high. </td></tr>
    <tr><td class="paramname">&gt;</td><td>1 should never occur. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00257">257</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gacf721556f8a9d59b8542347c1a398bf6"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_word_byte_write" ref="gacf721556f8a9d59b8542347c1a398bf6" args="(volatile uint32_t *word_address, uint8_t byte_no, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_word_byte_write </td>
          <td>(</td>
          <td class="paramtype">volatile uint32_t *&#160;</td>
          <td class="paramname"><em>word_address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>byte_no</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generic function for writing a single byte of a 32 bit word at a given address. </p>
<p>This function should not be called from outside the nrf_gpio abstraction layer.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">word_address</td><td>is the address of the word to be written.</td></tr>
    <tr><td class="paramname">byte_no</td><td>is the the word byte number (0-3) to be written.</td></tr>
    <tr><td class="paramname">value</td><td>is the value to be written to byte "byte_no" of word at address "word_address" </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00276">276</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2a875912b5b23a75207cc3e5a61eaf0f"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_word_byte_read" ref="ga2a875912b5b23a75207cc3e5a61eaf0f" args="(const volatile uint32_t *word_address, uint8_t byte_no)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE uint8_t nrf_gpio_word_byte_read </td>
          <td>(</td>
          <td class="paramtype">const volatile uint32_t *&#160;</td>
          <td class="paramname"><em>word_address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>byte_no</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Generic function for reading a single byte of a 32 bit word at a given address. </p>
<p>This function should not be called from outside the nrf_gpio abstraction layer.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">word_address</td><td>is the address of the word to be read.</td></tr>
    <tr><td class="paramname">byte_no</td><td>is the the byte number (0-3) of the word to be read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>byte "byte_no" of word at address "word_address". </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00294">294</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaaa72c88a2a29927a1eeff691d6a21afc"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_dir_set" ref="gaaa72c88a2a29927a1eeff691d6a21afc" args="(nrf_gpio_port_select_t port, nrf_gpio_port_dir_t dir)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_port_dir_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a>&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#ga494d7ac30db1cbb6366e0b9ebd5b49b4">nrf_gpio_port_dir_t</a>&#160;</td>
          <td class="paramname"><em>dir</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the direction of a port. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>is the port for which to set the direction.</td></tr>
    <tr><td class="paramname">dir</td><td>direction to be set for this port. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00306">306</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga40bee84dc81b9f8981eb2647dac9d267"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_read" ref="ga40bee84dc81b9f8981eb2647dac9d267" args="(nrf_gpio_port_select_t port)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE uint8_t nrf_gpio_port_read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a>&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read GPIO port. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>is the port to read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the input value on this port. </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00325">325</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac1d4940bc5ad4aad4f6363c7021b08ae"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_write" ref="gac1d4940bc5ad4aad4f6363c7021b08ae" args="(nrf_gpio_port_select_t port, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_port_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a>&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write GPIO port. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>is the port to write.</td></tr>
    <tr><td class="paramname">value</td><td>is the value to write to this port.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__nrf__gpio.html#gaaa72c88a2a29927a1eeff691d6a21afc" title="Set the direction of a port.">nrf_gpio_port_dir_set()</a> </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00339">339</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga16a605149e0f0fd93fdb49b2dcaffc43"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_set" ref="ga16a605149e0f0fd93fdb49b2dcaffc43" args="(nrf_gpio_port_select_t port, uint8_t set_mask)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_port_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a>&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>set_mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set individual pins on GPIO port. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>is the port for which to set the pins.</td></tr>
    <tr><td class="paramname">set_mask</td><td>is a mask specifying which pins to set. A bit set to 1 indicates that the corresponding port pin shall be set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__nrf__gpio.html#gaaa72c88a2a29927a1eeff691d6a21afc" title="Set the direction of a port.">nrf_gpio_port_dir_set()</a> </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00355">355</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga6752ee7db03061e5a3253891651c7c5e"></a><!-- doxytag: member="nrf_gpio.h::nrf_gpio_port_clear" ref="ga6752ee7db03061e5a3253891651c7c5e" args="(nrf_gpio_port_select_t port, uint8_t clr_mask)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE void nrf_gpio_port_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__nrf__gpio.html#gaa1a5c145e334817f2d960317d64fcb3d">nrf_gpio_port_select_t</a>&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>clr_mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clear individual pins on GPIO port. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>is the port for which to clear the pins.</td></tr>
    <tr><td class="paramname">clr_mask</td><td>is a mask specifying which pins to clear. A bit set to 1 indicates that the corresponding port pin shall be cleared.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__nrf__gpio.html#gaaa72c88a2a29927a1eeff691d6a21afc" title="Set the direction of a port.">nrf_gpio_port_dir_set()</a> </dd></dl>

<p>Definition at line <a class="el" href="nrf__gpio_8h_source.html#l00371">371</a> of file <a class="el" href="nrf__gpio_8h_source.html">nrf_gpio.h</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
